<template>
  <div class="empty-state">
    <div class="empty-icon">
      <svg
        xmlns="http://www.w3.org/2000/svg"
        width="64"
        height="64"
        viewBox="0 0 24 24"
        fill="none"
        stroke="currentColor"
        stroke-width="1.5"
      >
        <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
        <line x1="16" y1="2" x2="16" y2="6"></line>
        <line x1="8" y1="2" x2="8" y2="6"></line>
        <line x1="3" y1="10" x2="21" y2="10"></line>
      </svg>
    </div>
    <p class="empty-text">暂无文章内容</p>
    <p class="empty-subtext">
      {{ selectedYear ? `${selectedYear}年暂无文章` : '暂无任何文章' }}
    </p>
  </div>
</template>

<script setup>
defineProps({
  selectedYear: {
    type: [Number, null],
    default: null,
  },
})

defineOptions({ name: 'EmptyState' })
</script>

<style lang="scss" scoped>
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 40px;
  text-align: center;

  .empty-icon {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
  }

  .empty-text {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 8px;
  }

  .empty-subtext {
    color: var(--text-secondary);
    font-size: 14px;
    opacity: 0.8;
  }
}
</style>
